*, *:before, *:after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.root {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery {
    margin-top: 3%;
    width: 95%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: center;
    gap: 1vw;
}

.gallery__item {
    position: relative;
    cursor: pointer;
    width: 24.1%;
    height: 20rem;
    opacity: 0;
    transform: scale(0.9);
    transition: 0.9s ease-in-out all;
}
@media screen and (max-width: 895px) {
    .gallery__item{
        min-width: 49.4%;
    }
}
@media screen and (max-width: 649px) {
    .gallery__item{
        min-width: 49.4% !important;
        max-height: 10rem !important;
    }
}

.gallery__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery__item:before, .gallery__item:after {
    position: absolute;
}

.gallery__item:before {
    color: #fff;
    font-size: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.gallery__item:hover:before {
    font-size: 1.5rem;
}

.gallery__item:after {
    display: block;
    content: '';
    top: 50%;
    bottom: 50%;
    left: 50%;
    right: 50%;
    background-color: rgba(0 ,0 , 0, 0.5);
    z-index: 1;
}

.gallery__item:hover:after {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.gallery__item:after, .gallery__item, .gallery__img {
    border-radius: 5px;
}

.gallery-lightbox {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0 ,0 , 0, .9);
    font-size: 1rem;
    padding: 0 1rem;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
    width: 100%;
    height: 100%;
}

.gallery-lightbox.show {
    display: flex;
}

.gallery-lightbox__modal {
    display: flex;
    position: relative;
    padding: 5px;
    max-height: 90vh;
    border-radius: 5px;
    background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
    justify-content: center;
    align-items: center;
}
@media screen and (max-width: 1350px) {
    .gallery-lightbox__modal{
        max-height: 90vh;
        max-width: 90vw;
    }
    .gallery-lightbox__img {
        max-height: 90vh;
        max-width: 90vw;
    }
}
.gallery-lightbox__img {
    display: block;
    max-height: 90vh;
}

.gallery-lightbox__control {
    position: absolute;
    cursor: pointer;
}

.gallery-lightbox__control:before {
    display: block;
}

.gallery-lightbox__control.icon-close {
    top: 2vh;
    right:1.6vw;
    color: #fff;
    width: 2.5%;
    height: 4.5%;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-lightbox__control.icon-back, .gallery-lightbox__control.icon-next {
    top: 50%;
    font-size: 2rem;
    transform: translateY(-50%);
    color: #fff;
}

.gallery-lightbox__control.icon-back {
    left: 0rem;
}

.gallery-lightbox__control.icon-next {
    right: 0rem;
}
